package learn_concurrent._1;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class T9 {
	final static Logger logger = LoggerFactory.getLogger(T9.class);
	
	public static void main(String[] args) {
		Runnable r1 = () -> {
			int count = 0;
			for(;;) {
				System.out.println("---> 1 : " + count++);
			}
		};
		Runnable r2 = () -> {
			int count = 0;
			for(;;) {
//				Thread.yield();
				System.out.println("        ---> 2 : " + count++);
			}
		};
		Thread t1 = new Thread(r1);
		Thread t2 = new Thread(r2);
		
		t1.setPriority(Thread.MIN_PRIORITY);
		t1.setPriority(Thread.MAX_PRIORITY);
		
		t1.start();
		t2.start();
		
	}
	
	
}
